<?php
namespace App\Console\Commands;

use Illuminate\Console\Command;
use TopClient\request\TbkDgMaterialOptionalRequest;
use TopClient;
class DevTest extends Command
{
    protected $signature = "dev:test";

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = "dev test";


    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $baidu =  new \App\Service\Baidu();
        dd($baidu->geocoder(39.986357,116.499062));

        $c = TopClient::connection();
        $c->appkey = '25586445';
        $c->secretKey = 'ece52acfd6b1d72507f0e09b4eec44cd';
        $req = new TbkDgMaterialOptionalRequest;
        $req->setStartDsr("10");
        $req->setPageSize("20");
        $req->setPageNo("1");
        $req->setPlatform("1");
        $req->setEndTkRate("1234");
        $req->setStartTkRate("1234");
        $req->setEndPrice("10");
        $req->setStartPrice("10");
        $req->setIsOverseas("false");
        $req->setIsTmall("false");
        $req->setSort("tk_rate_des");
        $req->setItemloc("杭州");
        $req->setCat("16,18");
        $req->setQ("女装");
        // $req->setMaterialId("2836");
        $req->setHasCoupon("false");
        $req->setIp("13.2.33.4");
        $req->setAdzoneId("mm_225170016_233450193_73418450488");
        $req->setNeedFreeShipment("true");
        $req->setNeedPrepay("true");
        $req->setIncludePayRate30("true");
        $req->setIncludeGoodRate("true");
        $req->setIncludeRfdRate("true");
        $req->setNpxLevel("2");
        $req->setEndKaTkRate("1234");
        $req->setStartKaTkRate("1234");
        $req->setDeviceEncrypt("MD5");
        $req->setDeviceValue("xxx");
        $req->setDeviceType("IMEI");
        $resp = $c->execute($req);
        var_dump($resp);
    }
}